package com.fowo.api.model.sales.withdraw;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.validator.EnumsString;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 销售退货单 导入导出辅助模型 */
@Getter
@Setter
public class SalesWithdrawExcelPo {

  @Size(max = 60, message = "退货单号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "退货单号")
  private String rmaOrderNo;

  @EnumsString(
    value = { "买家退货", "物流退货" },
    message = "退货类型的可用值为 “买家退货”, “物流退货” 其中之一"
  )
  @Size(max = 20, message = "退货类型长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "退货类型")
  private String salesType;

  @Size(max = 50, message = "退货仓库长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "退货仓库")
  private String whnameName;

  @ExcelIgnore
  @ExcelProperty(value = "退货仓库")
  private Long whname;

  @Size(max = 50, message = "店铺长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "店铺")
  private String storeNameShopName;

  @ExcelIgnore
  @ExcelProperty(value = "店铺")
  private Long storeName;

  @Size(max = 50, message = "系统单号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "系统单号")
  private String globalOrderNo;

  @Size(max = 500, message = "退货原因长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "退货原因")
  private String reason;

  @EnumsString(
    value = { "待收货", "已完成", "已作废" },
    message = "订单状态的可用值为 “待收货”, “已完成”, “已作废” 其中之一"
  )
  @Size(max = 20, message = "订单状态长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "订单状态")
  private String status;

  @Size(max = 50, message = "物流商长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "物流商")
  private String logisticsProviderName;

  @Size(max = 50, message = "跟踪号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "跟踪号")
  private String trackingNo;

  @DateTimeFormat("yyyy年MM月dd日HH:mm:ss")
  @ExcelProperty(value = "预计到货时间")
  private java.util.Date preArrivalTime;

  @EnumsString(
    value = { "不预报", "预报" },
    message = "三方仓预报的可用值为 “不预报”, “预报” 其中之一"
  )
  @Size(max = 20, message = "三方仓预报长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "三方仓预报")
  private String hasPrediction;

  @Size(max = 500, message = "备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "备注")
  private String remark;

  @Size(max = 50, message = "仓库名称长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "仓库名称")
  private String wname;

  @Size(max = 50, message = "店铺名称长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "店铺名称")
  private String sname;
}
